package com.cc.model.convert

import com.cc.model.DiCategory
import com.cc.model.dto.DiCategoryDto
import org.mapstruct.*

@Mapper(unmappedTargetPolicy = ReportingPolicy.IGNORE, componentModel = MappingConstants.ComponentModel.SPRING)
abstract class DiCategoryConvert {

    abstract fun toEntity(diCategoryDto: DiCategoryDto): DiCategory

    abstract fun toDto(diCategory: DiCategory): DiCategoryDto

    @BeanMapping(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
    abstract fun partialUpdate(diCategoryDto: DiCategoryDto, @MappingTarget diCategory: DiCategory): DiCategory
}